# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         test03
# Description:
# Author:       98745
# Date:         2019/5/11
#-------------------------------------------------------------------------------

import _thread as thread

def get_page_html(url,lock):
    #todo
    lock.release()


def parse_page(txt,lock):
    #todo
    lock.release()


def save_data(data,lock):
    #todo
    lock.release()


def main():
    lock1=thread.start_new_thread()
    lock1.acquire()

    url=''
    thread.start_new_thread(get_page_html(),(url,lock1))

    if not lock1.locked():
        txt=''
        lock2=thread.start_new_thread()
        lock2.acquire()
        thread.start_new_thread(parse_page,(txt,lock2))
        if not lock2.locked():
            data = ''
            lock3 = thread.start_new_thread()
            lock3.acquire()
            thread.start_new_thread(save_data, (data, lock3))
            if not lock3.locked():
                exit()
    else:
        input()

if __name__ == '__main__':
    main()